package transactionAttribute;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.interceptor.Interceptors;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import javaTransactionAPI.Student;

@Stateless
@Remote
@Interceptors(interceptors.MyInterceptors.class)
public class transactionAttributeBean implements transactionAttribute {
	
	@PersistenceContext
	private EntityManager em;
	

	@Override
	@TransactionAttribute(TransactionAttributeType.SUPPORTS)
	public void addStudentSupports(Student student) {
		em.persist(student);
	}

}
